package v1

import (
	"ruoyi-vue-pro-go/internal/model/entity"

	"github.com/gogf/gf/v2/frame/g"
)

type GetOneReq struct {
	g.Meta `path:"/admin-api/system/menu/get" method:"get" tags:"menu" permission:"system:menu:query" summary:"Get menu by id"`
	Id     uint `v:"required" dc:"menu id"`
}
type GetOneRes struct {
	*entity.SystemMenu `dc:"menu"`
}
type GetListReq struct {
	g.Meta `path:"/admin-api/system/menu/list" method:"get" tags:"menu" summary:"Get menu list"`
}
type GetListRes struct {
	List []*entity.SystemMenu `json:"list" dc:"menu list"`
}

type GetListByIdsReq struct {
	MenuIds []int64 `json:"menu_ids" dc:"menu ids"`
}
type GetListByIdsRes struct {
	List []*entity.SystemMenu `json:"list" dc:"menu list"`
}

type CreateReq struct {
	g.Meta        `path:"/admin-api/system/menu/create" method:"post" tags:"menu" permission:"system:menu:create" summary:"Create menu"`
	Name          string `v:"required" dc:"菜单名称"`
	Permission    string `dc:"权限标识"`
	Type          int    `v:"required" dc:"菜单类型"`
	Sort          int    `v:"required" dc:"显示顺序"`
	ParentId      int64  `v:"required" dc:"父菜单ID"`
	Path          string `v:"required" dc:"路由地址"`
	Icon          string `v:"required" dc:"菜单图标"`
	Component     string `dc:"组件路径"`
	ComponentName string `dc:"组件名"`
	Status        int    `v:"required|in:0,1" dc:"菜单状态"`
	Visible       bool   `dc:"是否可见"`
	KeepAlive     bool   `dc:"是否缓存"`
	AlwaysShow    bool   `dc:"是否总是显示"`
}
type CreateRes struct{}

type DeleteReq struct {
	g.Meta `path:"/admin-api/system/menu/delete" method:"delete" tags:"menu" permission:"system:menu:delete" summary:"Delete menu"`
	Id     int64 `v:"required"`
}
type DeleteRes struct{}

type UpdateReq struct {
	g.Meta        `path:"/admin-api/system/menu/update" method:"put" tags:"menu" permission:"system:menu:update" summary:"Update menu"`
	Id            int64  `v:"required" dc:"menu id"`
	Name          string `v:"required" dc:"菜单名称"`
	Permission    string `dc:"权限标识"`
	Type          int    `v:"required" dc:"菜单类型"`
	Sort          int    `v:"required" dc:"显示顺序"`
	ParentId      int64  `v:"required" dc:"父菜单ID"`
	Path          string `v:"required" dc:"路由地址"`
	Icon          string `v:"required" dc:"菜单图标"`
	Component     string `dc:"组件路径"`
	ComponentName string `dc:"组件名"`
	Status        int    `v:"required|in:0,1" dc:"菜单状态"`
	Visible       bool   `dc:"是否可见"`
	KeepAlive     bool   `dc:"是否缓存"`
	AlwaysShow    bool   `dc:"是否总是显示"`
	Creator       string `dc:"创建人"`
	Updater       string `dc:"更新人"`
}
type UpdateRes struct{}
